<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<!-- Mirrored from www.wolfssl.com/wolfSSL/Docs-wolfssl-porting-guide.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Jan 2017 13:22:45 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="Generator" content="iWeb 3.0.4"/>
<meta name="iWeb-Build" content="local-build-20170103"/>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
<meta name="viewport" content="width=770"/>
<title>wolfSSL - Docs | wolfSSL Porting Guide</title>
<link rel="stylesheet" type="text/css" media="screen,print" href="Docs-wolfssl-porting-guide_files/Docs-wolfssl-porting-guide.css"/>
<!--[if lt IE 8]><link rel='stylesheet' type='text/css' media='screen,print' href='Docs-wolfssl-porting-guide_files/Docs-wolfssl-porting-guideIE.css'/><![endif]-->
<!--[if gte IE 8]><link rel='stylesheet' type='text/css' media='screen,print' href='Media/IE8.css'/><![endif]-->
<script type="text/javascript" src="Scripts/iWebSite.js"></script>
<script type="text/javascript" src="Docs-wolfssl-porting-guide_files/Docs-wolfssl-porting-guide.js"></script>
<meta name="description" content="Tips and guidance on porting wolfSSL lightweight SSL (formerly CyaSSL) to new platforms and environments."/><meta name="keywords" content="embedded ssl, ssl library, embedded web server, openssl alternative, openssl replacement, cyassl, stream ciphers ssl, aes-ni ssl, dtls, mysql ssl, portable ssl, ssl portable, portable tls, small openssl, smart grid, connected home, ecc, lightweight ssl, suite b, encryption security software, ssl inspection"/><meta name="robots" content="follow,index"/> <script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','../../www.google-analytics.com/analytics.js','ga');ga('create','UA-64826966-1','auto');ga('send','pageview');</script>
 
<script>//<![CDATA[
window.zEmbed||function(e,t){var n,o,d,i,s,a=[],r=document.createElement("iframe");window.zEmbed=function(){a.push(arguments)},window.zE=window.zE||window.zEmbed,r.src="javascript:false",r.title="",r.role="presentation",(r.frameElement||r).style.cssText="display: none",d=document.getElementsByTagName("script"),d=d[d.length-1],d.parentNode.insertBefore(r,d),i=r.contentWindow,s=i.document;try{o=s}catch(c){n=document.domain,r.src='javascript:var d=document.open();d.domain="'+n+'";void(0);',o=s}o.open()._l=function(){var o=this.createElement("script");n&&(this.domain=n),o.id="js-iframe-async",o.src=e,this.t=+new Date,this.zendeskHost=t,this.zEQueue=a,this.body.appendChild(o)},o.write('<body onload="document._l();">'),o.close()}("../../assets.zendesk.com/embeddable_framework/main.js","wolfssl.zendesk.com");
//]]></script>
  </head>
<body style="background: rgb(255, 255, 255); margin: 0pt; " onload="onPageLoad();">
<div style="text-align: center; ">
<div style="margin-bottom: 20px; margin-left: auto; margin-right: auto; margin-top: 20px; overflow: hidden; position: relative; word-wrap: break-word;  background: rgb(255, 255, 255); text-align: left; width: 770px; " id="body_content">
<div style="float: left; margin-left: 0px; position: relative; width: 770px; z-index: 0; " id="nav_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
<div style="clear: both; height: 0px; line-height: 0px; " class="spacer"> </div>
</div>
<div style="float: left; height: 0px; line-height: 0px; margin-left: 0px; position: relative; width: 770px; z-index: 10; " id="header_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
</div>
<div style="margin-left: 0px; position: relative; width: 770px; z-index: 5; " id="body_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
<div id="id1" style="height: 38px; left: 375px; position: absolute; top: 157px; width: 361px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_361_38" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style">wolfSSL Porting Guide</p>
</div>
</div>
</div>
<div id="id2" style="height: 6001px; left: 35px; position: absolute; top: 246px; width: 701px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_701_6001" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-top: 0pt; " class="paragraph_style_1">Purpose<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">This guide provides a reference for developers and engineers porting the wolfSSL lightweight SSL/TLS library to new embedded platforms, operating systems, or transport mediums (TCP/IP, bluetooth, etc.).  It calls out areas in the wolfSSL codebase which typically require modification when porting wolfSSL.  It should be considered a “guide” and as such, it is an evolving work.  If there is something you find missing, please let us know and we’ll be happy to add instructions or clarification to the document.<br/></p>
<p class="paragraph_style_2"><br/></p>
<div class="paragraph paragraph_style_3"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-porting-guide_files/shapeimage_1.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_1">Audience<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">This guide caters to developers or engineers porting the wolfSSL lightweight SSL/TLS library to new platforms or environments that are not supported by default.<br/></p>
<p class="paragraph_style_2"><br/></p>
<div class="paragraph paragraph_style_4"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-porting-guide_files/shapeimage_2.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_4">Table of Contents<br/></p>
<p class="paragraph_style_5"><br/></p>
<p class="paragraph_style_5">This table of contents includes commentary on when each section needs to be read.  Hopefully, this will expedite the reading process and eliminate unnecessary work.<br/></p>
<p class="paragraph_style_6"><br/></p>
<p class="paragraph_style_7">        1.  Introduction<br/></p>
<p class="paragraph_style_8"><br/></p>
<p class="paragraph_style_7">        2.  Porting wolfSSL<br/></p>
<p class="paragraph_style_9">                <br/></p>
<p class="paragraph_style_10">                2.1  <span class="style">Data Types</span><br/></p>
<p class="paragraph_style_10">                                Setting the correct data type size for your platform is always important.<br/></p>
<p class="paragraph_style_10">                2.2  <span class="style">Endianness</span><br/></p>
<p class="paragraph_style_10">                                Necessary if your platform is a big endian system.<br/></p>
<p class="paragraph_style_10">                2.3  <span class="style">writev</span><br/></p>
<p class="paragraph_style_10">                                Necessary if &lt;sys/uio.h&gt; is not available.<br/></p>
<p class="paragraph_style_10">                2.4  <span class="style">Input / Output<br/></span></p>
<ol>
<li style="line-height: 14px; padding-left: 107px; text-indent: -107px; " class="full-width">
<p style="text-indent: -107px; " class="paragraph_style_11"><span style="font-size: 0px; position: relative; top: -7px; " class="Bullet"></span><span style="width: 107px; " class="inline-block"></span>Necessary if a BSD-style socket API is not available, you are using a custom transport layer or TCP/IP stack, or only want to use static buffers.<br/></p>
</li>
</ol>
<p class="paragraph_style_10">                2.5  <span class="style">Filesystem</span><span class="style_1"><br/></span></p>
<ol>
<li style="line-height: 14px; padding-left: 107px; text-indent: -107px; " class="full-width">
<p style="text-indent: -107px; " class="paragraph_style_11"><span style="font-size: 0px; position: relative; top: -7px; " class="Bullet"></span><span style="width: 107px; " class="inline-block"></span>Necessary if file system is not available, standard file system functions are not available, or you have a custom file system.<br/></p>
</li>
</ol>
<p class="paragraph_style_10">                2.6  <span class="style">Threading</span><span class="style_1"><br/></span></p>
<ol>
<li style="line-height: 14px; padding-left: 107px; text-indent: -107px; " class="full-width">
<p style="text-indent: -107px; " class="paragraph_style_11"><span style="font-size: 0px; position: relative; top: -7px; " class="Bullet"></span><span style="width: 107px; " class="inline-block"></span>Necessary if you want to use wolfSSL in a multithreaded environment, or want to just compile it in single threaded mode.<br/></p>
</li>
</ol>
<p class="paragraph_style_10">                2.7  <span class="style">Random Seed<br/></span></p>
<ol>
<li style="line-height: 14px; padding-left: 107px; text-indent: -107px; " class="full-width">
<p style="text-indent: -107px; " class="paragraph_style_11"><span style="font-size: 0px; position: relative; top: -7px; " class="Bullet"></span><span style="width: 107px; " class="inline-block"></span>Necessary if either /dev/random or /dev/urandom is not available or you want to integrate into a hardware RNG.<br/></p>
</li>
</ol>
<p class="paragraph_style_10">                2.8  <span class="style">Memory</span><span class="style_1"><br/></span></p>
<ol>
<li style="line-height: 14px; padding-left: 107px; text-indent: -107px; " class="full-width">
<p style="text-indent: -107px; " class="paragraph_style_11"><span style="font-size: 0px; position: relative; top: -7px; " class="Bullet"></span><span style="width: 107px; " class="inline-block"></span>Necessary when you don’t have standard memory functions available or are interested in memory usage differences between optional math libraries.<br/></p>
</li>
</ol>
<p class="paragraph_style_10">                2.9  <span class="style">Time</span><br/></p>
<ol>
<li style="line-height: 14px; padding-left: 107px; text-indent: -107px; " class="full-width">
<p style="text-indent: -107px; " class="paragraph_style_11"><span style="font-size: 0px; position: relative; top: -7px; " class="Bullet"></span><span style="width: 107px; " class="inline-block"></span>Necessary when standard time functions are not available, or you need to define a custom clock tick function.<br/></p>
</li>
</ol>
<p class="paragraph_style_10">                2.10  <span class="style">C Standard Library<br/></span></p>
<ol>
<li style="line-height: 14px; padding-left: 107px; text-indent: -107px; " class="full-width">
<p style="text-indent: -107px; " class="paragraph_style_11"><span style="font-size: 0px; position: relative; top: -7px; " class="Bullet"></span><span style="width: 107px; " class="inline-block"></span>Necessary when a C standard library is not available, or using a custom one.<br/></p>
</li>
</ol>
<p class="paragraph_style_10">                2.11  <span class="style">Logging</span><span class="style_1"><br/></span></p>
<ol>
<li style="line-height: 14px; padding-left: 107px; text-indent: -107px; " class="full-width">
<p style="text-indent: -107px; " class="paragraph_style_11"><span style="font-size: 0px; position: relative; top: -7px; " class="Bullet"></span><span style="width: 107px; " class="inline-block"></span>Necessary when debug messages desired but stderr is unavailable.<br/></p>
</li>
</ol>
<p class="paragraph_style_10">                2.12  <span class="style">Public Key Operations<br/></span></p>
<ol>
<li style="line-height: 14px; padding-left: 107px; text-indent: -107px; " class="full-width">
<p style="text-indent: -107px; " class="paragraph_style_11"><span style="font-size: 0px; position: relative; top: -7px; " class="Bullet"></span><span style="width: 107px; " class="inline-block"></span>Necessary if you want to use your own public key implementation.<br/></p>
</li>
</ol>
<p class="paragraph_style_10">                2.13  <span class="style">Atomic Record Layer Processing<br/></span></p>
<ol>
<li style="line-height: 14px; padding-left: 107px; text-indent: -107px; " class="full-width">
<p style="text-indent: -107px; " class="paragraph_style_11"><span style="font-size: 0px; position: relative; top: -7px; " class="Bullet"></span><span style="width: 107px; " class="inline-block"></span>Necessary if you want to do your own processing of record layers, specifically MAC/encrypt and decrypt/verify operations.<br/></p>
</li>
</ol>
<p class="paragraph_style_10">                2.14  <span class="style">Features<br/></span></p>
<ol>
<li style="line-height: 14px; padding-left: 107px; text-indent: -107px; " class="full-width">
<p style="text-indent: -107px; " class="paragraph_style_11"><span style="font-size: 0px; position: relative; top: -7px; " class="Bullet"></span><span style="width: 107px; " class="inline-block"></span>Necessary when you want to disable features.<br/></p>
</li>
<li style="line-height: 14px; padding-left: 93px; text-indent: -93px; " class="full-width">
<p style="text-indent: -93px; " class="paragraph_style_12"><span style="font-size: 0px; position: relative; top: -7px; " class="Bullet"></span><span style="width: 93px; " class="inline-block"></span><br/></p>
</li>
</ol>
<p class="paragraph_style_7">        3.  Next Steps<br/></p>
<p class="paragraph_style_7"><br/></p>
<p class="paragraph_style_9"><span class="style_1">                3.1  </span>wolfCrypt Test Application<br/></p>
<p class="paragraph_style_9"><span class="style_1"><br/></span></p>
<p class="paragraph_style_7">        4.  Support<br/></p>
<p class="paragraph_style_13"><span style="line-height: 14px; " class="style_2"><br/></span></p>
<div class="paragraph paragraph_style_14"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-porting-guide_files/shapeimage_3.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><span class="tinyText"> </span><span style="line-height: 27px; " class="style_2"><br/></span></div>
<p class="paragraph_style_14">1. Introduction<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">Several steps need to be iterated through when getting wolfSSL to run on an embedded platform.  Some of these steps are outlined in <a title="Docs-wolfssl-manual-2-building-wolfssl.html" href="Docs-wolfssl-manual-2-building-wolfssl.html">Section 2.4 of the wolfSSL Manual</a> (&quot;Building in a non-standard environment&quot;).<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">Apart from steps in Chapter 2 of the wolfSSL Manual, there are several areas in the code which may need porting or modifications in order to accommodate a specific platform.  wolfSSL abstracts many of these areas - attempting to make it as easy as possible to port wolfSSL to a new platform.  <br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">In the ./wolfssl/ctaocrypt/settings.h file, there are several defines specific to different operating systems, TCP/IP stacks, and chipsets (MBED, FREESCALE_MQX, MICROCHIP_PIC32, MICRIUM, EBSNET, etc.).  New defines are typically added to the settings.h file when a new port of wolfSSL is completed which requires modifications to wolfSSL.  It provides an easy way to turn on/off features as well as customize build settings.  Feel free to add a new custom define in this file when doing a port of wolfSSL to a new platform.  We encourage users to contribute ports of wolfSSL back to the main open source code branch.  This helps keep wolfSSL up to date and allows different ports to remain updated as the wolfSSL project improves and moves forward.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">wolfSSL encourages the submission of patches and code changes through either direct email (<a title="mailto:info@wolfssl.com" href="https://www.wolfssl.com/cdn-cgi/l/email-protection#721b1c141d32051d1e1401011e5c111d1f"><span class="__cf_email__" data-cfemail="82ebece4edc2f5edeee4f1f1eeace1edef">[email&#160;protected]</span><script data-cfhash='f9e31' type="text/javascript">/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */</script></a>), or through GitHub pull request (<a title="https://github.com/wolfssl/wolfssl" href="https://github.com/wolfssl/wolfssl">https://github.com/wolfssl/wolfssl</a>).<br/></p>
<p class="paragraph_style_15"><span style="line-height: 14px; " class="style_3"><br/></span></p>
<div class="paragraph paragraph_style_1"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-porting-guide_files/shapeimage_4.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><span class="tinyText"> </span><span style="line-height: 27px; " class="style_3"><br/></span></div>
<p class="paragraph_style_1">2. Porting CyaSSL<br/></p>
<p class="paragraph_style_16"><br/></p>
<p class="paragraph_style_17">2.1 Data Types<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_19">Q:  When do I need to read this section?<br/></p>
<p class="paragraph_style_20">A:  Setting the correct data type size for your platform is always important.<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_2">wolfSSL benefits speed-wise from having a 64-bit type available.  Set <span class="style">SIZEOF_LONG</span> or <span class="style">SIZEOF_LONG_LONG</span> to match the result of sizeof(long) and sizeof(long long) on your platform.  This can be added to your custom define in the settings.h file.  For example, in settings.h under a sample define of <span class="style">MY_NEW_PLATFORM</span>:<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_21">#ifdef MY_NEW_PLATFORM<br/></p>
<p class="paragraph_style_21">#define SIZEOF_LONG 4<br/></p>
<p class="paragraph_style_21">#define SIZEOF_LONG_LONG 8<br/></p>
<p class="paragraph_style_21">...<br/></p>
<p class="paragraph_style_21">#endif<br/></p>
<p class="paragraph_style_18"><span style="line-height: 15px; " class="style_3"><br/></span></p>
<p class="paragraph_style_17">2.2 Endianness<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_19">Q:  When do I need to read this section?<br/></p>
<p class="paragraph_style_20">A:  Your platform is a big endian system.<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_2">Is your platform big endian or little endian?  wolfSSL defaults to a little endian system.  If your system is big endian, define <span class="style">BIG_ENDIAN_ORDER</span> when building wolfSSL.  Example of setting this in settings.h:<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_21">#ifdef MY_NEW_PLATFORM<br/></p>
<p class="paragraph_style_21">...<br/></p>
<p class="paragraph_style_21">#define BIG_ENDIAN_ORDER<br/></p>
<p class="paragraph_style_21">...<br/></p>
<p class="paragraph_style_21">#endif<br/></p>
<p class="paragraph_style_15"><span style="line-height: 14px; " class="style_3"><br/></span></p>
<p class="paragraph_style_17">2.3 writev<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_19">Q:  When do I need to read this section?<br/></p>
<p class="paragraph_style_20">A:  &lt;sys/uio.h&gt; is not available.<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_2">By default, the wolfSSL API makes available wolfSSL_writev() to applications, which simulates writev() semantics.  On systems that don’t have the &lt;sys/uio.h&gt; header available, define <span class="style">NO_WRITEV</span> to exclude this feature.<br/></p>
<p class="paragraph_style_15"><span style="line-height: 14px; " class="style_3"><br/></span></p>
<p class="paragraph_style_17">2.4 Input / Output<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_19">Q:  When do I need to read this section?<br/></p>
<p class="paragraph_style_20">A:  A BSD-style socket API is not available, you are using a custom transport layer or TCP/IP stack, or only want to use static buffers.<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_2">wolfSSL defaults to using a BSD-style socket interface.  If your transport layer provides a BSD socket interface, wolfSSL should integrate into it as-is, unless custom headers are needed.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">wolfSSL provides a custom I/O abstraction layer which allows users to tailor wolfSSL's I/O functionality to their system.  Full details can be found in <a title="Docs-wolfssl-manual-5-portability.html" href="Docs-wolfssl-manual-5-portability.html">Section 5.1.2 of the wolfSSL Manual</a>.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">Simply put, you can define <span class="style">WOLFSSL_USER_IO</span>, then write your own I/O callback functions using wolfSSL's default EmbedSend() and EmbedReceive() as templates.  These two functions are located in ./src/io.c.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">wolfSSL uses dynamic buffers for input and output, which default to 0 bytes.  If an input record is received that is greater in size than the buffer, then a dynamic buffer is temporarily used to handle the request and then freed.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">If you prefer using large, 16kB static buffers which will never need dynamic memory, you can enable this option by defining <span class="style">LARGE_STATIC_BUFFERS</span>.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">If dynamic buffers are used and the user requests an wolfSSL_write() that is bigger than the buffer size, then a dynamic block up to <span class="style">MAX_RECORD_SIZE</span> is used to send the data. Users wishing to only send the data in chunks of the current buffer size at maximum, as defined by <span class="style">RECORD_SIZE</span>, can do this by defining <span class="style">STATIC_CHUNKS_ONLY</span>.  When using this define, RECORD_SIZE defaults to 128 bytes.<br/></p>
<p class="paragraph_style_15"><span style="line-height: 14px; " class="style_3"><br/></span></p>
<p class="paragraph_style_17">2.5 Filesystem<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_22">Q:  When do I need to read this section?<span class="style_4"><br/></span></p>
<p class="paragraph_style_20">A:  No file system is available, standard file system functions are not available, or you have a custom file system.<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_2">wolfSSL uses the filesystem for loading keys and certificates into the SSL session or context.  wolfSSL also allows loading these from memory buffers.  If strictly using memory buffers, a filesystem is not needed.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">You can disable wolfSSL's usage of the filesystem by defining <span class="style">NO_FILESYSTEM</span> when building the library.  This means that certificates and keys will need to be loaded from memory buffers instead of files.  An example of setting this in settings.h:<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_21">#ifdef MY_NEW_PLATFORM<br/></p>
<p class="paragraph_style_21">...<br/></p>
<p class="paragraph_style_21">#define NO_FILESYSTEM<br/></p>
<p class="paragraph_style_21">...<br/></p>
<p class="paragraph_style_21">#endif<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">Test key and certificate buffers can be found in the ./wolfssl/certs_test.h header file.  These will match up to corresponding certificates and keys found in the ./certs directory.  <br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">The certs_test.h header file can be updated using the ./gencertbuf.pl script if needed.  Inside gencertbuf.pl, there are two arrays:  <span class="style">fileList_1024</span> and <span class="style">fileList_2048</span>.  Additional certificates or keys may be added to the respective array, depending on key size, and must be in DER format.  The above mentioned arrays map a certificate/key file location with the desired buffer name.  After modifying gencertbuf.pl, running it from the wolfSSL root directory will update the certificate and key buffers in ./wolfssl/certs_test.h:<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_21">./gencertbuf.pl<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">If you would like to use a filesystem other than the default, the filesystem abstraction layer is located in ./src/ssl.c.  Here you will see filesystem ports for various platforms including EBSNET, FREESCALE_MQX, and MICRIUM.  You can add a custom define for your platform if needed - allowing you to define file system functions with XFILE, XFOPEN, XFSEEK, etc.  For example, the filesystem layer in ssl.c for Micrium's µC/OS (MICRIUM) is as follows:<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_21">#elif defined(MICRIUM)                                                          <br/></p>
<p class="paragraph_style_23">#include &lt;fs.h&gt;                                                             <br/></p>
<p class="paragraph_style_23">#define XFILE      FS_FILE*                                                 <br/></p>
<p class="paragraph_style_23">#define XFOPEN     fs_fopen                                                 <br/></p>
<p class="paragraph_style_23">#define XFSEEK     fs_fseek                                                 <br/></p>
<p class="paragraph_style_23">#define XFTELL     fs_ftell                                                 <br/></p>
<p class="paragraph_style_23">#define XREWIND    fs_rewind                                                <br/></p>
<p class="paragraph_style_23">#define XFREAD     fs_fread                                                 <br/></p>
<p class="paragraph_style_23">#define XFCLOSE    fs_fclose                                                <br/></p>
<p class="paragraph_style_23">#define XSEEK_END  FS_SEEK_END                                              <br/></p>
<p class="paragraph_style_23">#define XBADFILE   NULL <br/></p>
<p class="paragraph_style_24"><br/></p>
<p class="paragraph_style_17">2.6 Threading<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_22">Q:  When do I need to read this section?<span class="style_4"><br/></span></p>
<p class="paragraph_style_20">A:  You want to use wolfSSL in a multithreaded environment, or want to just compile it in single threaded mode.<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_2">If wolfSSL will only be used in a single threaded environment, the wolfSSL mutex layer can be disabled when compiling wolfSSL by defining <span class="style">SINGLE_THREADED</span>.  This will negate the need to port the wolfSSL mutex layer.  <br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">If wolfSSL needs to be used in a multithreaded environment, the wolfSSL mutex layer will need to be ported to the new environment.  The mutex layer can be found in ./wolfssl/ctaocrypt/wc_port.h and ./ctaocrypt/src/wc_port.c.  wolfSSL_Mutex will need to be defined for the new system in port.h and the mutex functions(InitMutex, FreeMutex, etc.) in wc_port.c.  Search in wc_port.h and wc_port.c for some existing platform port layers (EBSNET, FREESCALE_MQX, etc.) as examples.<br/></p>
<p class="paragraph_style_25"><br/></p>
<p class="paragraph_style_17">2.7 Random Seed<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_22">Q:  When do I need to read this section?<span class="style_4"><br/></span></p>
<p class="paragraph_style_20">A:  Either <span class="style_5">/dev/random</span> or <span class="style_5">/dev/urandom</span> is not available or you want to integrate into a hardware RNG.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">By default, wolfSSL uses /dev/urandom or /dev/random to generate a RNG seed.  The <span class="style">NO_DEV_RANDOM</span> define can be used when building wolfSSL to disable the default GenerateSeed() function.  If this is defined, you need to write a custom GenerateSeed() function in ./wolfcrypt/src/random.c, specific to your target platform.  This allows you to seed wolfSSL’s PRNG with a hardware-based random entropy source if available.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">For examples of how <span class="style">GenerateSeed</span>() needs to be written, reference wolfSSL’s existing <span class="style">GenerateSeed</span>() implementations in ./<span class="style">wolfcrypt/src/random.c</span>.<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_17">2.8 Memory<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_22">Q:  When do I need to read this section?<span class="style_4"><br/></span></p>
<p class="paragraph_style_20">A:  When you don’t have standard memory functions available or are interested in memory usage differences between optional math libraries.<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_2">wolfSSL proper uses both malloc() and free() by default.  When using the normal big integer math library, wolfCrypt will also use realloc().  <br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">By default wolfSSL/wolfCrypt use the normal big integer math library, which uses quite a bit of dynamic memory.  When building wolfSSL, the fastmath library can be enabled, which is both faster and uses no dynamic memory for crypto operations (all on the stack).  By using fastmath, wolfSSL won't need a realloc() implementation at all.  As the SSL layer of wolfSSL still uses some dynamic memory, malloc() and free() are still required.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">For a comparison of resource usage (stack/heap) between the big integer math library and fastmath library, ask us to see our Resource Use document.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">To enable fastmath, define <span class="style">USE_FAST_MATH</span> and build in ./wolfcrypt/src/tfm.c instead of ./wolfcrypt/src/integer.c.  Since the stack memory can be large when using fastmath, we recommend defining <span class="style">TFM_TIMING_RESISTANT</span> as well.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">If the normal malloc(), free(), and possibly realloc() functions are not available, define XMALLOC_USER, then provide custom memory function hooks in ./wolfssl/wolfcrypt/types.h specific to the target environment.  <br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">Please read <a title="Docs-wolfssl-manual-5-portability.html" href="Docs-wolfssl-manual-5-portability.html">section 5.1.1.1 of the wolfSSL Manual</a> for details about using XMALLOC_USER.<br/></p>
<p class="paragraph_style_26"><span class="style_1"><br/></span></p>
<p class="paragraph_style_17">2.9 Time<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_22">Q:  When do I need to read this section?<span class="style_4"><br/></span></p>
<p class="paragraph_style_20">A:  When standard time functions (time(), gmtime()) are not available, or you need to specify a custom clock tick function.<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_2">By default, wolfSSL uses time(), gmtime(), and ValidateDate(), as specified in ./ctaocrypt/src/asn.c.  These are abstracted to XTIME, XGMTIME, and XVALIDATE_DATE.  If the standard time functions, and time.h, are not available, the user can define <span class="style">USER_TIME</span>.  After defining USER_TIME, the user can define their own XTIME, XGMTIME, and XVALIDATE_DATE functions.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">wolfSSL uses time(0) by default for the clock tick function.  This is located in ./src/internal.c inside of the LowResTimer() function.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">Defining <span class="style">USER_TICKS</span> allows the user to define their own clock tick function if time(0) is not wanted. The custom function needs second accuracy, but doesn’t have to be correlated to EPOCH.  See LowResTimer() function in ./src/internal.c for reference.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_17">2.10 C Standard Library<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_22">Q:  When do I need to read this section?<span class="style_4"><br/></span></p>
<p class="paragraph_style_20">A:  When you don’t have a C standard library available, or have a custom one.<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_2">wolfSSL can be built without the C standard library to provide a higher level of portability and flexibility to developers.  When doing so, the user needs to map functions they wish to use instead of the C standard ones.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">Section 7, above, covered memory functions.  In addition to memory function abstraction, wolfSSL also abstracts string function and math functions, where the specific functions are typically abstracted to a define in the form of X&lt;FUNC&gt;, where &lt;FUNC&gt; is the name of the function being abstracted.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">Please read <a title="Docs-wolfssl-manual-5-portability.html" href="Docs-wolfssl-manual-5-portability.html">Section 5.1 of the wolfSSL Manual</a> for details.<span class="style_1"><br/></span></p>
<p class="paragraph_style_26"><span class="style_1"><br/></span></p>
<p class="paragraph_style_17">2.11 Logging<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_22">Q:  When do I need to read this section?<span class="style_4"><br/></span></p>
<p class="paragraph_style_20">A:  You want to enable debug messages but don’t have stderr available.<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_2">By default, wolfSSL provides debug output through stderr.  In order for debug messages to be enabled, wolfSSL must be compiled with <span class="style">DEBUG_WOLFSSL</span> defined, and <span class="style">wolfSSL_Debugging_ON</span>() must be called from the application code.  <span class="style">wolfSSL_Debugging_OFF</span>() may be used by the application layer to turn off wolfSSL debug messages.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">For environments which do not have stderr available, or wish to output debug messages over a different output stream or in a different format, wolfSSL allows applications to register a logging callback.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">Please read <a title="Docs-wolfssl-manual-8-debugging.html" href="Docs-wolfssl-manual-8-debugging.html">Section 8.1 of the wolfSSL Manual</a> for details.<br/></p>
<p class="paragraph_style_27"><span class="style_1"><br/></span></p>
<p class="paragraph_style_28"><span class="style_1"><br/></span></p>
<p class="paragraph_style_17">2.12 Public Key Operations<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_22">Q:  When do I need to read this section?<span class="style_4"><br/></span></p>
<p class="paragraph_style_20">A:  You want to use your own public key implementation with CyaSSL.<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_2">wolfSSL allows users to write their own public key callbacks which will be called when the SSL/TLS layer needs to do public key operations.  The user can optionally define 6 functions:<br/></p>
<p class="paragraph_style_2"><br/></p>
<ol>
<li style="line-height: 15px; padding-left: 36px; text-indent: -25px; " class="full-width" value="1">
<p style="text-indent: -25px; " class="paragraph_style_29"><span style="font-size: 12px; " class="Bullet">1.</span><span style="width: 15px; " class="inline-block"></span>ECC sign callback<br/></p>
</li>
<li style="line-height: 15px; padding-left: 36px; text-indent: -25px; " class="full-width" value="2">
<p style="text-indent: -25px; " class="paragraph_style_29"><span style="font-size: 12px; " class="Bullet">2.</span><span style="width: 15px; " class="inline-block"></span>ECC verify callback<br/></p>
</li>
<li style="line-height: 15px; padding-left: 36px; text-indent: -25px; " class="full-width" value="3">
<p style="text-indent: -25px; " class="paragraph_style_29"><span style="font-size: 12px; " class="Bullet">3.</span><span style="width: 15px; " class="inline-block"></span>RSA sign callback<br/></p>
</li>
<li style="line-height: 15px; padding-left: 36px; text-indent: -25px; " class="full-width" value="4">
<p style="text-indent: -25px; " class="paragraph_style_29"><span style="font-size: 12px; " class="Bullet">4.</span><span style="width: 15px; " class="inline-block"></span>RSA verify callback<br/></p>
</li>
<li style="line-height: 15px; padding-left: 36px; text-indent: -25px; " class="full-width" value="5">
<p style="text-indent: -25px; " class="paragraph_style_29"><span style="font-size: 12px; " class="Bullet">5.</span><span style="width: 15px; " class="inline-block"></span>RSA encrypt callback<br/></p>
</li>
<li style="line-height: 15px; padding-left: 36px; text-indent: -25px; " class="full-width" value="6">
<p style="text-indent: -25px; " class="paragraph_style_29"><span style="font-size: 12px; " class="Bullet">6.</span><span style="width: 15px; " class="inline-block"></span>RSA decrypt callback<br/></p>
</li>
</ol>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">For full details, please read <a title="Docs-wolfssl-manual-6-callbacks.html" href="Docs-wolfssl-manual-6-callbacks.html">Section 6.4 of the wolfSSL Manual</a>.<span class="style_1"><br/></span></p>
<p class="paragraph_style_27"><span class="style_1"><br/></span></p>
<p class="paragraph_style_17">2.13 Atomic Record Layer Processing<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_22">Q:  When do I need to read this section?<span class="style_4"><br/></span></p>
<p class="paragraph_style_20">A:  You want to do your own processing of record layers, specifically MAC/encrypt and decrypt/verify operations.<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_2">By default, wolfSSL handles record layer processing for the user using its cryptography library, wolfCrypt.  wolfSSL provides Atomic Record Processing callbacks for users who wish to have more control over MAC/encrypt and decrypt/verify functionality during the SSL/TLS connection.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">The user will need to define 2 functions:<br/></p>
<ol>
<li style="line-height: 15px; padding-left: 36px; text-indent: -25px; " class="full-width" value="1">
<p style="text-indent: -25px; " class="paragraph_style_29"><span style="font-size: 12px; " class="Bullet">1.</span><span style="width: 15px; " class="inline-block"></span>MAC/encrypt callback function<br/></p>
</li>
<li style="line-height: 15px; padding-left: 36px; text-indent: -25px; " class="full-width" value="2">
<p style="text-indent: -25px; " class="paragraph_style_29"><span style="font-size: 12px; " class="Bullet">2.</span><span style="width: 15px; " class="inline-block"></span>Decrypt/verify callback function<br/></p>
</li>
</ol>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">For full details, please read <a title="Docs-wolfssl-manual-6-callbacks.html" href="Docs-wolfssl-manual-6-callbacks.html">Section 6.3 of the wolfSSL Manual</a>.<span style="line-height: 15px; " class="style_2"><br/></span></p>
<p class="paragraph_style_27"><span style="line-height: 15px; " class="style_2"><br/></span></p>
<p class="paragraph_style_17">2.14 Features<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_22">Q:  When do I need to read this section?<span class="style_4"><br/></span></p>
<p class="paragraph_style_20">A:  When you want to disable features.<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_2">Features can be disabled when building wolfSSL by using the appropriate defines.  For a list of defines available, please refer to <a title="Docs-wolfssl-manual-2-building-wolfssl.html" href="Docs-wolfssl-manual-2-building-wolfssl.html">Chapter 2 of the wolfSSL Manual</a>.<span class="style_1"><br/></span></p>
<p class="paragraph_style_26"><span class="style_1"><br/></span></p>
<div class="paragraph paragraph_style_30"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-porting-guide_files/shapeimage_5.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><span class="tinyText"> </span><span class="style_1"><br/></span></div>
<p class="paragraph_style_1">3. Next Steps<br/></p>
<p class="paragraph_style_16"><br/></p>
<p class="paragraph_style_17">3.1 wolfCrypt Test Application<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_2">After getting wolfSSL proper to build on the target platform, a good next step is to port the wolfCrypt test application.  Running this application on the target system will verify that all the crypto algorithms are working correctly, using NIST test vectors.  <br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">If this step is skipped, and you instead proceed directly to establishing an SSL connection, it can be more difficult to debug problems caused by underlying crypto operations failing.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">The wolfCrypt test application is located in ./wolfcrypt/test/test.c.  If an embedded application has its own main() function, then <span class="style">NO_MAIN_DRIVER</span> may be defined when compiling ./wolfcrypt/test/test.c.  This will allow the application’s main() to call each cipher/algorithm test individually on its own.<br/></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">If an embedded device does not have enough resources to run the entire wolfCrypt test application, individual tests can be broken out of test.c and compiled individually.  Please ensure that correct header files needed for the specific test case are included in the build when extracting isolated crypto tests from test.c.<br/></p>
<p class="paragraph_style_18"><br/></p>
<div class="paragraph paragraph_style_1"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-porting-guide_files/shapeimage_6.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_1">4. Support<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_18">General support questions may be sent directly to wolfSSL either through email, support forums, or wolfSSL’s Zendesk ticket tracking system.<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_18"><span class="style">Website</span>:   <a title="https://www.wolfssl.com/" href="https://www.wolfssl.com/">https://www.wolfssl.com</a><br/></p>
<p class="paragraph_style_18"><span class="style">Support Email</span>:  <a title="mailto:support@wolfssl.com" href="https://www.wolfssl.com/cdn-cgi/l/email-protection#691a1c1919061b1d291e06050f1a1a05470a0604"><span class="__cf_email__" data-cfemail="c0b3b5b0b0afb2b480b7afaca6b3b3aceea3afad">[email&#160;protected]</span><script data-cfhash='f9e31' type="text/javascript">/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */</script></a><br/></p>
<p class="paragraph_style_18"><span class="style">Zendesk</span>:   <a title="https://wolfssl.zendesk.com/" href="https://wolfssl.zendesk.com/">https://wolfssl.zendesk.com</a><br/></p>
<p class="paragraph_style_18"><span class="style">Forums</span>:     <a title="http://www.wolfssl.com/forums" href="http://www.wolfssl.com/forums">http://www.wolfssl.com/forums</a><br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_18">wolfSSL offers several support packages as well as consulting services to help users and customers port wolfSSL to new environments.<br/></p>
<p class="paragraph_style_18"><br/></p>
<p class="paragraph_style_18"><span class="style">Support Package</span>:  <a title="https://www.wolfssl.com/wolfSSL/Support/support_tiers.php" href="Support/support_tiers.html">https://www.wolfssl.com/wolfSSL/Support/support_tiers.php</a><br/></p>
<p style="padding-bottom: 0pt; " class="paragraph_style_18"><span class="style">General Inquiries</span>: <a title="mailto:info@wolfssl.com" href="https://www.wolfssl.com/cdn-cgi/l/email-protection#4b22252d240b3c24272d38382765282426"><span class="__cf_email__" data-cfemail="a0c9cec6cfe0d7cfccc6d3d3cc8ec3cfcd">[email&#160;protected]</span><script data-cfhash='f9e31' type="text/javascript">/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */</script></a></p>
</div>
<div style="clear: both; height: 0px; line-height: 0px; " class="tinyText"> </div>
</div>
</div>
<div id="id3" style="height: 26px; left: 193px; position: absolute; top: 122px; width: 268px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_268_26" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_31"><a class="class1" title="Docs.html" href="Docs.html">Docs</a> <span class="style_6">-&gt;</span> <span class="style_7">wolfSSL Porting Guide</span></p>
</div>
</div>
</div>
<div style="height: 1px; width: 698px;  height: 1px; left: 37px; position: absolute; top: 220px; width: 698px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 698px; ">
<img src="Docs-wolfssl-porting-guide_files/shapeimage_7.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 698px; "/>
</div>
</div>
<div style="height: 37px; width: 545px;  height: 37px; left: 191px; position: absolute; top: 80px; width: 545px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 545px; ">
<img src="Docs-wolfssl-porting-guide_files/shapeimage_8.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 545px; "/>
</div>
</div>
<div id="id4" style="height: 25px; left: 200px; position: absolute; top: 84px; width: 43px; z-index: 1; " class="style_SkipStroke_1 shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_43_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_32"><a class="class2" title="Home.html" href="Home.html">Home</a></p>
</div>
</div>
</div>
<div id="id5" style="height: 25px; left: 365px; position: absolute; top: 84px; width: 72px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_72_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_33"><a class="class3" title="https://wolfssl.com/wolfSSL/download/downloadForm.php" href="https://wolfssl.com/wolfSSL/download/downloadForm.php">Download</a></p>
</div>
</div>
</div>
<div id="id6" style="height: 25px; left: 439px; position: absolute; top: 84px; width: 59px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_59_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_33"><a class="class4" title="License.html" href="License.html">License</a></p>
</div>
</div>
</div>
<div id="id7" style="height: 25px; left: 499px; position: absolute; top: 84px; width: 44px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_44_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_33"><a class="class5" title="Blog/Blog.html" href="Blog/Blog.html">Blog</a></p>
</div>
</div>
</div>
<div id="id8" style="height: 25px; left: 589px; position: absolute; top: 84px; width: 80px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_80_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_33"><a class="class6" title="Community.html" href="Community.html">Community</a></p>
</div>
</div>
</div>
<div style="height: 36px; width: 1px;  height: 36px; left: 245px; position: absolute; top: 81px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-porting-guide_files/shapeimage_9.png" alt="" style="height: 36px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 37px; width: 1px;  height: 37px; left: 296px; position: absolute; top: 80px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-porting-guide_files/shapeimage_10.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 36px; width: 1px;  height: 36px; left: 363px; position: absolute; top: 81px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-porting-guide_files/shapeimage_11.png" alt="" style="height: 36px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 36px; width: 1px;  height: 36px; left: 438px; position: absolute; top: 81px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-porting-guide_files/shapeimage_12.png" alt="" style="height: 36px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 37px; width: 1px;  height: 37px; left: 498px; position: absolute; top: 80px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-porting-guide_files/shapeimage_13.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 37px; width: 1px;  height: 37px; left: 589px; position: absolute; top: 80px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-porting-guide_files/shapeimage_14.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div id="id9" style="height: 25px; left: 671px; position: absolute; top: 84px; width: 61px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_61_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_33"><a class="class7" title="Contact.html" href="Contact.html">Contact</a></p>
</div>
</div>
</div>
<div id="id10" style="height: 25px; left: 249px; position: absolute; top: 84px; width: 44px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_44_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_32"><a class="class8" title="About.html" href="About.html">About</a></p>
</div>
</div>
</div>
<div style="height: 36px; width: 1px;  height: 36px; left: 670px; position: absolute; top: 81px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-porting-guide_files/shapeimage_15.png" alt="" style="height: 36px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div id="id11" style="height: 25px; left: 298px; position: absolute; top: 84px; width: 63px; z-index: 1; " class="style_SkipStroke_1 shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_63_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_33"><a class="class9" title="Products.html" href="Products.html">Products</a></p>
</div>
</div>
</div>
<div id="id12" style="height: 25px; left: 549px; position: absolute; top: 84px; width: 41px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_41_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_32"><a class="class10" title="Docs.html" href="Docs.html">Docs</a></p>
</div>
</div>
</div>
<div style="height: 37px; width: 1px;  height: 37px; left: 545px; position: absolute; top: 80px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-porting-guide_files/shapeimage_16.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div id="id13" style="height: 27px; left: 59px; position: absolute; top: 190px; width: 216px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_216_27" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_34"><a class="class11" title="https://www.wolfssl.com/documentation/wolfSSL-Porting-Guide.pdf" href="https://www.wolfssl.com/documentation/wolfSSL-Porting-Guide.pdf">Download wolfSSL Porting Guide (PDF)</a></p>
</div>
</div>
</div>
<div style="height: 22px; width: 22px;  height: 22px; left: 33px; position: absolute; top: 191px; width: 22px; z-index: 1; " class="tinyText style_SkipStroke_2">
<img src="Docs-wolfssl-porting-guide_files/PDF.png" alt="" style="border: none; height: 22px; width: 22px; "/>
</div>
<div style="height: 16px; width: 20px;  height: 16px; left: 706px; position: absolute; top: 51px; width: 20px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 20px; ">
<img src="Docs-wolfssl-porting-guide_files/shapeimage_17.png" alt="" style="height: 16px; left: 0px; position: absolute; top: 0px; width: 20px; "/>
</div>
</div>
<div style="height: 19px; width: 19px;  height: 19px; left: 707px; position: absolute; top: 25px; width: 19px; z-index: 1; " class="tinyText style_SkipStroke_2">
<img src="Docs-wolfssl-porting-guide_files/United%20Kingdom(Great%20Britain).png" alt="" style="border: none; height: 19px; width: 19px; "/>
</div>
<div id="id14" style="height: 23px; left: 328px; position: absolute; top: 48px; width: 258px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_258_23" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_35">Questions? +1 (425) 245-8247</p>
</div>
</div>
</div>
<div style="height: 19px; width: 19px;  height: 19px; left: 685px; position: absolute; top: 25px; width: 19px; z-index: 1; " class="tinyText style_SkipStroke_2">
<a href="http://www.wolfssl.jp/" title="http://www.wolfssl.jp"><img src="Docs-wolfssl-porting-guide_files/japan.png" alt="" style="border: none; height: 19px; width: 19px; "/></a>
</div>
<div id="id15" style="height: 28px; left: 593px; position: absolute; top: 44px; width: 119px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_119_28" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_36"><a class="class12" title="https://www.wolfssl.com/forums" href="https://www.wolfssl.com/forums">Support <span class="style_8">Forums</span></a></p>
</div>
</div>
</div>
<div style="height: 121px; width: 155px;  height: 121px; left: 32px; position: absolute; top: 5px; width: 155px; z-index: 1; " class="tinyText style_SkipStroke_2">
<a href="Home.html" title="Home.html"><img src="Docs-wolfssl-porting-guide_files/wolfssl_logo.png" alt="" style="border: none; height: 121px; width: 156px; "/></a>
</div>
<div style="height: 6247px; line-height: 6247px; " class="spacer"> </div>
</div>
<div style="height: 100px; margin-left: 0px; position: relative; width: 770px; z-index: 15; " id="footer_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
<div id="id16" style="height: 29px; left: 35px; position: absolute; top: 28px; width: 701px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_701_29" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_37">Copyright 2017 wolfSSL Inc.  All rights reserved.</p>
</div>
</div>
</div>
</div>
</div>
</div>
 <script type="text/javascript">/* <![CDATA[ */(function(d,s,a,i,j,r,l,m,t){try{l=d.getElementsByTagName('a');t=d.createElement('textarea');for(i=0;l.length-i;i++){try{a=l[i].href;s=a.indexOf('/cdn-cgi/l/email-protection');m=a.length;if(a&&s>-1&&m>28){j=28+s;s='';if(j<m){r='0x'+a.substr(j,2)|0;for(j+=2;j<m&&a.charAt(j)!='X';j+=2)s+='%'+('0'+('0x'+a.substr(j,2)^r).toString(16)).slice(-2);j++;s=decodeURIComponent(s)+a.substr(j,m-j)}t.innerHTML=s.replace(/</g,'&lt;').replace(/>/g,'&gt;');l[i].href='mailto:'+t.value}}catch(e){}}}catch(e){}})(document);/* ]]> */</script></body>

<!-- Mirrored from www.wolfssl.com/wolfSSL/Docs-wolfssl-porting-guide.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Jan 2017 13:22:45 GMT -->
</html>
